package com.attendance.www.hr.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.attendance.www.hr.dao.mapper.MainUsersNewMapper;
import com.attendance.www.hr.dao.mapper.MainUsersVersionMapper;
import com.attendance.www.hr.entitys.MainUsersExample;
import com.attendance.www.hr.entitys.MainUsersNew;
import com.attendance.www.hr.entitys.MainUsersNewExample;
import com.attendance.www.hr.service.IMainUsersNewService;
@Service
public class MainUsersNewServiceImpl implements IMainUsersNewService{
	@Resource
	private MainUsersNewMapper mainUsersNewDao;
	
	/**
	 * 查询人员增量主数据表
	 */
	@Override
	public List<MainUsersNew> getMainUsersNewList() {
		List<MainUsersNew> mainUsersNewList = mainUsersNewDao.selectByExample(new MainUsersNewExample());
		return mainUsersNewList;
	}

	/**
	 * 增加人员增量主数据表
	 */
	@Override
	public void saveMainUsersNew(List<MainUsersNew> mainUsersNewList) {
		for (int i = 0; i < mainUsersNewList.size(); i++) {
			mainUsersNewDao.insertSelective(mainUsersNewList.get(i));
		}
	}

	/**
	 * 删除人员增量主数据表
	 */
	@Override
	public boolean deleteMainUsersNew() {
		if(mainUsersNewDao.deleteByExample(new MainUsersNewExample())>0) {
			return true;
		}
		return false;
	}

}
